package com.asset.dispoal.gbEvidenceIdentification.service;

import com.asset.dispoal.gbEvidenceIdentification.api.GbEvidenceIdentificationService;
import com.asset.dispoal.gbEvidenceIdentification.dto.GbEvidenceIdentificationRequest;
import com.asset.dispoal.gbEvidenceIdentification.dto.GbEvidenceIdentificationResponse;
import com.asset.dispoal.gbEvidenceIdentification.service.commom.DeleteEvidenceIdentificationCommand;
import com.asset.dispoal.gbEvidenceIdentification.service.commom.InsertEvidenceIdentificationCommand;
import com.asset.dispoal.gbEvidenceIdentification.service.commom.QueryEvidenceIdentificationCommand;
import com.asset.dispoal.gbEvidenceIdentification.service.commom.UpdateEvidenceIdentificationCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.mhuang.pacebox.springboot.protocol.Result;
import tech.mhuang.pacebox.springboot.protocol.data.PageVO;

import java.util.List;

/**
 * 识别通用配置服务实现类
 *
 * @author: mhuang
 * @date: 2022-03-03 13:51:16
 */
@Service
public class GbEvidenceIdentificationServiceImpl implements GbEvidenceIdentificationService {

    @Autowired
    DeleteEvidenceIdentificationCommand deleteEvidenceIdentificationCommand;

    @Autowired
    InsertEvidenceIdentificationCommand insertEvidenceIdentificationCommand;

    @Autowired
    UpdateEvidenceIdentificationCommand updateEvidenceIdentificationCommand;

    @Autowired
    QueryEvidenceIdentificationCommand queryEvidenceIdentificationCommand;

    @Override
    public void insert(List<GbEvidenceIdentificationRequest> request) {
        insertEvidenceIdentificationCommand.execute(request);
    }

    @Override
    public void update(GbEvidenceIdentificationRequest request) {
        updateEvidenceIdentificationCommand.execute(request);
    }

    @Override
    public void delete(String id) {
        deleteEvidenceIdentificationCommand.execute(id);
    }

    @Override
    public Result<PageVO<GbEvidenceIdentificationResponse>> queryPage(GbEvidenceIdentificationRequest request) {
        final Result<PageVO<GbEvidenceIdentificationResponse>> execute = queryEvidenceIdentificationCommand.execute(request);
        return execute;
    }
}